#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
WIKI_DIR="$ROOT_DIR/docs/wiki"
ISSUES_DIR="$ROOT_DIR/.agent-society/issues"

if ! command -v markdownlint >/dev/null 2>&1; then
  echo "markdownlint not found; please install npm markdownlint-cli" >&2
  exit 1
fi

shopt -s globstar
markdownlint "$WIKI_DIR"/**/*.md "$ISSUES_DIR"/**/*.md

python3 "$ROOT_DIR/ci/validate_wiki_structure.py"
